﻿using UnityEngine;
using UnityEngine.UI;

public class RoomInfoItemView : MonoBehaviour
{
    private RoomInfoData _data;

    [SerializeField] private Text _roomName;
    [SerializeField] private Text _memberInfo;

    public void RefreshByData(RoomInfoData data)
    {
        _data = data;
        _roomName.text = _data.RoomName;
        _memberInfo.text = string.Format("{0}/{1}", _data.CurrentMemberCount, _data.MaxMemberCount);
    }
    
    
}

public class RoomInfoData
{
    public string RoomName;
    public int CurrentMemberCount;
    public int MaxMemberCount;
    public string Ip;
}